home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / utils / nroff~yu.zoo / tmac.an < prev    next >
Text File  |  1992-09-11  |  15KB  |  592 lines

  1. .\" @(*) tmac.an 1.2p0 92/7/14 rosenkra
  2. .\" **************************************************************************
  3. .\" -man package for nroff. almost unix(tm), adequate/working...
  4. .\"
  5. .\" note: needs .tm for .IX and .CX, also uses .ie/.el
  6. .\"
  7. .\" usage:        nroff -man file
  8. .\" installed path:    c:\lib\tmac\tmac.an (TMACDIR)
  9. .\" user macros:    TH, SH, SS, IP, HP, PP, LP, RS, RE, IX, CX
  10. .\"            R, I, B, SM, IR, RI, BR, RB, BI, IB, PD
  11. .\" extensions:        EX, Th, pp, RP
  12. .\" no-ops:        
  13. .\" debuging:        }D
  14. .\" internal macros:    none
  15. .\" strings used:    S, ux, lq, rq, `, ', DW, Dy, Da, Yr, DY, TM, DA, CT,
  16. .\"            Se
  17. .\" registers used:    I, D, M, O, X, Z (user can set O for online)
  18. .\" bugs:        IP does not place short tags on same line.
  19. .\"            no TP, DT.
  20. .\"            no \*R (macros and strings share namespace).
  21. .\" notes:        change all "0.8i" below to "0.5i" for more unix-like
  22. .\"            compatability
  23. .\" author:        rosenkra@convex.com (Bill Rosenkranz)
  24. .\" version:        for ST nroff v1.2p0
  25. .\" date:        92/7/14
  26. .\" restrictions:    none. freely distributable (no copyright, etc.)
  27. .\"
  28. .\" **************************************************************************
  29. .\"
  30. .\" control
  31. .\"
  32. .\" set register O on command line (-rO1) to make manpage for online viewing
  33. .\" i.e. without headers/footers and with exit macro. or else make $6 in TH
  34. .\" "ONLINE" to do the same. this sets register X to 1.
  35. .\"
  36. .\" set this >0 to turn on debugging
  37. .nr Z 0
  38. .\" set this >0 for use with manpager(1) (sets special chars, fonts)
  39. .nr M 1
  40. .\" set paragraph distance
  41. .nr D 1
  42. .\" set relative indent register
  43. .nr I 0
  44. .\" set this =1 to eliminate headers/footers or =0 to have them
  45. .nr O 1
  46. .\"
  47. .\" **************************************************************************
  48. .\"
  49. .\" some predefined strings (quotes, etc)
  50. .\"
  51. .ds Me tmac.an
  52. .ie \nM>0 \{\
  53. .\".    ds R  
  54. .    ds S s
  55. .    ds lq !
  56. .    ds rq "
  57. .    ds `  `
  58. .    ds '  '
  59. .    ds ux Unix
  60. \}
  61. .el \{\
  62. .\".    ds R  (Reg)
  63. .    ds S s
  64. .    ds lq ""
  65. .    ds rq ""
  66. .    ds `  `
  67. .    ds '  '
  68. .    ds ux Unix(tm)
  69. \}
  70. .\"
  71. .\" these are various predefined date and time strings
  72. .\"
  73. .\" DW day-of-week:
  74. .if \n(dw=1  .ds DW "Sun
  75. .if \n(dw=2  .ds DW "Mon
  76. .if \n(dw=3  .ds DW "Tue
  77. .if \n(dw=4  .ds DW "Wed
  78. .if \n(dw=5  .ds DW "Thu
  79. .if \n(dw=6  .ds DW "Fri
  80. .if \n(dw=7  .ds DW "Sat
  81. .\" Dy month day:
  82. .if \n(mo=1  .ds Dy "Jan \n(dy
  83. .if \n(mo=2  .ds Dy "Feb \n(dy
  84. .if \n(mo=3  .ds Dy "Mar \n(dy
  85. .if \n(mo=4  .ds Dy "Apr \n(dy
  86. .if \n(mo=5  .ds Dy "May \n(dy
  87. .if \n(mo=6  .ds Dy "Jun \n(dy
  88. .if \n(mo=7  .ds Dy "Jul \n(dy
  89. .if \n(mo=8  .ds Dy "Aug \n(dy
  90. .if \n(mo=9  .ds Dy "Sep \n(dy
  91. .if \n(mo=10 .ds Dy "Oct \n(dy
  92. .if \n(mo=11 .ds Dy "Nov \n(dy
  93. .if \n(mo=12 .ds Dy "Dec \n(dy
  94. .ds Da "\n(hh:\n(mm:\n(ss \n(mo/\n(dy/\n(yr
  95. .ds Yr "19\n(yr
  96. .ds DY "\*(Dy, \*(Yr
  97. .ds TM "\n(hh:\n(mm:\n(ss
  98. .ds DA "\*(TM \*(DY
  99. .ds CT "\*(DW \*(Dy \*(TM 19\n(yr
  100. .\"
  101. .\" they look like this:
  102. .\"
  103. .\"    DW    Sun
  104. .\"     Dy    Mar 4
  105. .\"     DY    Mar 4, 1990
  106. .\"    Yr    1990
  107. .\"     TM    16:34:00
  108. .\"     DA    16:34:00 Mar 4, 1990
  109. .\"    Da    16:34:00 2/4/90
  110. .\"     CT    Sun Mar 4 16:34:00 1990        like ctime(2)
  111. .\"
  112. .\" **************************************************************************
  113. .\"
  114. .\" startup stuff...
  115. .\"
  116. .\" X is number register used internally here. it is initially 0. it gets
  117. .\" set to 1 in TH if ONLINE is set. it is used in the EX macro to force
  118. .\" an immediate exit at the end. user can also force ONLINE with -rO1.
  119. .\"
  120. .in 0.0i
  121. .po 0.0i
  122. .lt 7.2i
  123. .ll 7.2i
  124. .m1 3
  125. .m2 3
  126. .m3 3
  127. .m4 3
  128. .nr X 0
  129. .\" set exit macro (mainly for ONLINE, no-op if not)
  130. .em EX
  131. .\"
  132. .\" **************************************************************************
  133. .\"
  134. .\" MACROS...
  135. .\"
  136. .\" ----------------------------------------------------------------------- TH
  137. .\" main page heading
  138. .\"
  139. .\" fields are usually: 1-name, 2-section, 3-section name, 4-version, 5-date
  140. .\" 1,2,3 are on header, 4,5 and page on footer. empty strings are skipped
  141. .\" by making the arg "". this must be first! there is an extra field at the
  142. .\" end ($6) which, if "ONLINE", prints the page without page breaks (i.e.
  143. .\" headers/footers).
  144. .\"
  145. .\"    $1   $2                  $3
  146. .\"      |    |                   |
  147. .\"      v    v                   v
  148. .\"    NAME (1)               Section                 NAME (1)
  149. .\"    ...
  150. .\"    Version                 Date                     Page n
  151. .\"        ^                      ^
  152. .\"        |                      |
  153. .\"      $4                     $5
  154. .\"
  155. .\"    .TH NAME 1 "Commands" "Version 1.0" "7 March 1990" ["ONLINE"]
  156. .\"
  157. .\" there is an extension here: if the 6th argument is "ONLINE" then the
  158. .\" resultant output does not have any headers/footers. this is useful for
  159. .\" making manpages for online use.
  160. .\"
  161. .de TH
  162. .if \n(.$<2 \{\
  163. .    sp 2
  164. \&\*(Me: FATAL ERROR, too few args for TH
  165. .    sp 2
  166. .    ex
  167. \}
  168. .if !\nO>0 \{\
  169. .\"    define Se as default chapter name based on input chapter number
  170. .    if $2=0 .ds Se "General Information
  171. .    if $2=1 .ds Se "Commands and Applications
  172. .    if $2=2 .ds Se "System Calls
  173. .    if $2=3 .ds Se "Library Calls
  174. .    if $2=4 .ds Se "Hardware and Special Files
  175. .    if $2=5 .ds Se "File Formats
  176. .    if $2=6 .ds Se "Games
  177. .    if $2=7 .ds Se "Miscellaneous
  178. .    if $2=8 .ds Se "Administation Commands
  179. \}
  180. .\" if the 6th arg is "ONLINE", set up for online docs output (no head/foot)
  181. .\" the X reg is used by macro EX (exit). the user can force ONLINE by
  182. .\" setting reg "O" on cmdline (-rO1)
  183. .if \n(.$>5 .if "$6"ONLINE" .nr O 1
  184. .ie \nO>0 \{\
  185. .\"     no headers of footers (ONLINE)
  186. .    m1 0
  187. .    m2 0
  188. .    m3 0
  189. .    m4 0
  190. .    nr X 1
  191. \}
  192. .el \{\
  193. .\"     set page len, include headers of footers (!ONLINE)
  194. .    pl 66
  195. .    if \n(.$<3 .tl |$1($2)|\*(Se|$1($2)|
  196. .    if \n(.$>2 .if !"$3"" .tl |$1($2)|$3|$1($2)|
  197. .    if \n(.$>2 .if "$3""  .tl |$1($2)|\*(Se|$1($2)|
  198. .    if \n(.$<4 .fo |Atari ST|Printed: \*(DY|Page %|
  199. .    if \n(.$<5 .if "$4""  .fo |Atari ST|Printed: \*(DY|Page %|
  200. .    if \n(.$<5 .if !"$4"" .fo |$4|Printed: \*(DY|Page %|
  201. .    if \n(.$>4 .if !"$4"" .if !"$5"" .fo |$4|Release: $5|Page %|
  202. .    if \n(.$>4 .if !"$4"" .if "$5""  .fo |$4|Printed: \*(DY|Page %|
  203. .    if \n(.$>4 .if "$4""  .if !"$5"" .fo |Atari ST|Release: $5|Page %|
  204. .    if \n(.$>4 .if "$4""  .if "$5""  .fo |Atari ST|Printed: \*(DY|Page %|
  205. \}
  206. .in 0.8i
  207. ..
  208. .\" ----------------------------------------------------------------------- Th
  209. .\" alternate main page heading
  210. .\"
  211. .\" this prints no header/footer so it is good for creating online docs
  212. .\" for man(1). it ignores all args.
  213. .\"
  214. .\"    .Th NAME 1
  215. .\"
  216. .de Th
  217. .m1 0
  218. .m2 0
  219. .m3 0
  220. .m4 0
  221. .in 0.8i
  222. .nr X 1
  223. ..
  224. .\" ----------------------------------------------------------------------- EX
  225. .\" exit NOW if ONLINE. (no extra space at end of document)
  226. .\"
  227. .de EX
  228. .if \nX>0 \{\
  229. .    sp
  230. .    fl
  231. .    ex
  232. \}
  233. ..
  234. .\" ----------------------------------------------------------------------- PD
  235. .\" set paragraph distance
  236. .\"
  237. .de PD
  238. .ie \n(.$=0 .nr D 1
  239. .el .nr D $1
  240. ..
  241. .\" ----------------------------------------------------------------------- RS
  242. .\" start relative indent. does not add space.
  243. .\"
  244. .de RS
  245. .br
  246. .\"    .sp 1
  247. .ie \n(.$=0 \{\
  248. .    in +0.8i
  249. .    nr I +0.8i
  250. \}
  251. .el \{\
  252. .    in +$1
  253. .    nr I +$1
  254. \}
  255. ..
  256. .\" ----------------------------------------------------------------------- RE
  257. .\" end relative indent. does not add space.
  258. .\"
  259. .de RE
  260. .br
  261. .ie \n(.$=0 \{\
  262. .    in -0.8i
  263. .    nr I -0.8i
  264. \}
  265. .el \{\
  266. .    in -$1
  267. .    nr I -$1
  268. \}
  269. ..
  270. .\" ----------------------------------------------------------------------- IP
  271. .\" indented paragraph with tag (from this line)
  272. .\"
  273. .de IP
  274. .\" new version, with indent as $2. tag MUST be quoted to include blanks...
  275. .br
  276. .if \nD>0 \{\
  277. .    sp \nD
  278. \}
  279. .in 0.8i
  280. .in +\nI
  281. .if \n(.$>0 .if !"$1"" \&$1
  282. .br
  283. .if \n(.$<2 .in +0.8i
  284. .if \n(.$>1 .in +$2
  285. ..
  286. .\" ----------------------------------------------------------------------- HP
  287. .\" indented paragraph with hanging indent, no tag. first resets absolute ind.
  288. .\"
  289. .de HP
  290. .br
  291. .if \nD>0 \{\
  292. .    sp \nD
  293. \}
  294. .in 0.8i
  295. .in +\nI
  296. .ie \n(.$=0 \{\
  297. .    in +0.8i
  298. .    ti -0.8i
  299. \}
  300. .el \{\
  301. .    in +$1
  302. .    ti -$1
  303. \}
  304. ..
  305. .\" ----------------------------------------------------------------------- RP